package com.amado.course53EncodeDecode;

import java.util.Base64;

public class Base64Encoder {
	public static void main(String[] args) {
		String encodeStr  = Base64.getEncoder().encodeToString("我是&<?中国人".getBytes());
		System.out.println("base64加码后的编码 = "+encodeStr);
		String decoderStr = new String(Base64.getDecoder().decode(encodeStr));
		System.out.println("base64解码后的编码 = "+decoderStr);
		
	}
}
